package persistence;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Set;


/**
 * The persistent class for the wrap database table.
 * 
 */
@Entity
@Table(name="wrap")
public class Wrap implements Serializable {
	private static final long serialVersionUID = 1L;
	private int idwrap;
	private String wrap;
	private Set<Firm> firms;

    public Wrap() {
    }


	@Id
	public int getIdwrap() {
		return this.idwrap;
	}

	public void setIdwrap(int idwrap) {
		this.idwrap = idwrap;
	}


	public String getWrap() {
		return this.wrap;
	}

	public void setWrap(String wrap) {
		this.wrap = wrap;
	}


	//bi-directional many-to-many association to Firm
    @ManyToMany
	@JoinTable(
		name="Firm_has_wrap"
		, joinColumns={
			@JoinColumn(name="wrap_idwrap")
			}
		, inverseJoinColumns={
			@JoinColumn(name="Firm_crd", referencedColumnName="crd"),
			@JoinColumn(name="Firm_idFirm", referencedColumnName="idFirm")
			}
		)
	public Set<Firm> getFirms() {
		return this.firms;
	}

	public void setFirms(Set<Firm> firms) {
		this.firms = firms;
	}
	
}